package cn.webrx;

import java.util.stream.DoubleStream;
import java.util.stream.Stream;

public class Lambda3 {
    public static void main(String[] args) {

        Stream<User> su = Stream.of(new User(1, "李四", 20));
        //su.filter(u->u.show());
        //su.filter(User::show);

        su.filter(e -> java.lang.Math.random() > .5);

        DoubleStream.generate(java.lang.Math::random).limit(3);
        DoubleStream.generate(java.lang.Math::random).limit(3);

        Stream<User> susu1 = Stream.generate(() -> new User());

        Stream<User> susu2 = Stream.generate(User::new);
    }

}
